package study.saas.order.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import study.saas.common.viewmodel.BaseEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;


@Data
@Entity
@Table(name="orderr",
        indexes = {
                @Index(name = "orderId_index", columnList = "orderId"),
        })
@ApiModel
public class Orderr extends BaseEntity {

    @Column
    @ApiModelProperty(value = "订单ID")
    private Integer orderId;

    @Column
    @ApiModelProperty(value = "订单数量")
    private Integer orderAmount;

    @Column(length = 64)
    @ApiModelProperty(value = "订单名称")
    private String orderName;


    @Column(columnDefinition = "int default 0")
    protected Integer isDeleted = 0;

    public Boolean isDelete() {
        return isDeleted == 1;
    }
}
